package ControlLayer;
import ModelLayer.*;
import java.util.ArrayList;

/**
 * Write a description of class GoodsCtr here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class ProductCtr
{
    private Stock stock;

    public ProductCtr()
    {
        stock = stock.getSingelton();
    }


    public void createProduct(int barcode, int price, String name, int stocknumber, int min, int max, String supplier)
    {
        Product product = new Product(barcode, price, name, stocknumber, min, max, supplier);
        stock.createProduct(product);
    }
    
    public Product findProduct(int barcode)
    {
        return stock.findProduct(barcode);
    }
    
    public void updateProduct(int barcode, int price, String name, int stocknumber, int min, int max, String supplier)
    {
        stock.updateProduct(barcode, price, name, stocknumber, min, max, supplier);
    }
    
    public void deleteProduct(int barcode)
    {
        stock.deleteProduct(barcode);
    }
    
    public ArrayList<Product> createOrderList()
    {
        return stock.createOrderList();
    }
}
